#include "factory.h"
#include "abstract_product.h"

#include <iostream>

AbstractFactory::AbstractFactory()
{}

AbstractFactory::~AbstractFactory()
{}

FactoryA::FactoryA()
{
	std::cout << "create FactoryA instance" << std::endl;
}

FactoryA::~FactoryA()
{
	std::cout << "release FactoryA instance" << std::endl;
}

AbstractProduct* FactoryA::CreateProduct()
{
	return new ProductA();
}

FactoryB::FactoryB()
{
	std::cout << "create FactoryB instance" << std::endl;
}

FactoryB::~FactoryB()
{
	std::cout << "release FactoryB instance" << std::endl;
}

AbstractProduct* FactoryB::CreateProduct()
{
	return new ProductB();
}